<%@page import="com.fang.yttz.model.Tbuser"%>
<%@page import="com.fang.yttz.SysParameter"%>
<%@ page language="java"  pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<% 
	Tbuser sessionUser = (Tbuser)session.getAttribute(SysParameter.sessionObj);
	if (sessionUser != null) {
		out.println("<script language='javascript'>window.location.href='"+basePath+"reReferer.do'</script>");
	}
	if(request.getHeader("Referer")!=null&&!request.getHeader("Referer").contains("login")){
		out.println("<script language='javascript'>window.parent.location.href='"+basePath+"login.jsp'</script>");
	} 
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<%@ include file="/behind/common.jsp"%>
<head>
<title>易通投资网站管理后台</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<style>
html,body {
	width: 100%;
	height: 100%;
	padding: 0px;
	margin: auto;
	overflow: hidden;
	background: url(${pageContext.request.contextPath}/backstyle/img/login/logoin_bg.jpg)
		repeat-x #0499bc;
	position: relative;
}

.The_father {
	position: absolute;
	width: 0px;
	height: 0px;
	left: 50%;
	top: 50%;
}

.the_login {
	background:
		url(${pageContext.request.contextPath}/backstyle/img/login/logoin_lgo.jpg)
		no-repeat center;
	width: 1024px;
	height: 500px;
	position: absolute;
	left: -512px;
	top: -250px;
}

.logo {
	width: 239px;
	height: 82px;
	position: absolute;
	left: 50px;
	top: -62px;
}

.logo_name {
	position: absolute;
	left: 280px;
	top: 50px;
	font-size: 36px;
	color: #FFF;
	text-align: center;
	font-weight: bold;
	letter-spacing: 5px;
	line-height: 50px;
}

.logo_name span {
	font-size: 14px;
	font-weight: normal;
}

.logo_user {
	color: #000;
	font-size: 13px;
	position: absolute;
	left: 420px;
	top: 154px;
	line-height: 54px;
}

.user_input {
	width: 108px;
	height: 19px;
	position: absolute;
	left: 470px;
	top: 170px;
}

.role_input {
	width: 108px;
	height: 19px;
	position: absolute;
	left: 470px;
	top: 228px;
}

.mima_input {
	width: 108px;
	height: 19px;
	position: absolute;
	left: 470px;
	top: 228px;
}

.mima_input2 {
	width: 108px;
	height: 19px;
	position: absolute;
	left: 470px;
	top: 228px;
}

.logo_input {
	background: none;
	width: 104px;
	height: 15px;
	border: none;
}

.but_denglu {
	position: absolute;
	background:
		url(${pageContext.request.contextPath}/backstyle/img/login/but_denglu.jpg)
		no-repeat;
	width: 52px;
	height: 24px;
	left: 426px;
	top: 280px;
	border: none;
	cursor: pointer;
}

.but_quxiao {
	position: absolute;
	background:
		url(${pageContext.request.contextPath}/backstyle/img/login/but_quxiao.jpg)
		no-repeat;
	width: 52px;
	height: 24px;
	left: 514px;
	top: 280px;
	border: none;
	cursor: pointer;
}

.the_bottom {
	position: absolute;
	bottom: 30px;
	width: 50%;
	text-align: left;
	left: 115px;
	font-size: 13px;
	line-height: 22px;
	font-family: Arial
}

.the_bottom_right {
	position: absolute;
	bottom: 30px;
	text-align: right;
	right: 115px;
	font-size: 13px;
	line-height: 22px;
	font-family: Arial
}
</style>

<script type="text/javascript">
	jQuery.fn.imageAutoSize = function(width, height) {
		$("img", this).each(function() {
			var image = $(this);
			if (image.width() > width) {
				image.height(width / image.width() * image.height());
				image.width(width);
			}
			if (image.height() > height) {
				image.width(height / image.height() * image.width());
				image.height(height);
			}
		});
	};
	//提交验证	
	function submit_onclick() {
		var loginid = $('#loginid').val();
		var userpwd = $('#userpwd').val();
		if(isNUll(loginid)){
			jAlert('<font color=\"#D7A728\">用户名不能为空。</font>','系统提示',function(){$('#loginid').focus();});
		}else if(isNUll(userpwd)){
			jAlert('<font color=\"#D7A728\">用户密码不能为空。</font>','系统提示',function(){$('#userpwd').focus();});
		}else{
			$("form").submit();
		}
	}
	//回车触发
	function loginOnKey(e) {
        var key = window.event ? e.keyCode : e.which;
        if (key == 13) {
        	submit_onclick();
        }
    }

	// 消除空格   
	function trim(str) { //删除左右两端的空格
		return str.replace(/(^\s*)|(\s*$)/g, "");
	}
</script>
</head>

<body onkeydown="loginOnKey(event);">
	<div class="The_father">
		<div id="hiddenarea" style="display: block"></div>
		<div class="the_login">
<!-- 			<div class="logo" id="logo_con"> -->
<%-- 				<img src="${pageContext.request.contextPath}/backstyle/img/login/logo.png"></img> --%>
<!-- 			</div> -->
			<div class="logo_name">
				易通投资网站管理后台
			</div>
			<form action="${pageContext.request.contextPath}/login.do" id="myform" method="post">
				<div class="logo_user">
					管理员:<br />密 码：
				</div>
				<div class="user_input" id='user_input'>
					<input type="text" class="logo_input" id="loginid" style="border: 0px" maxlength="6" name="loginid" />
				</div>
				<div class='mima'>
					<div class="mima_input">
						<input type="password" class="logo_input" maxlength="6" name="userpwd" id="userpwd"/>
					</div>
				</div>
				<button type="button" class="but_denglu" onClick="submit_onclick();"></button>
				<button type="reset" class="but_quxiao"></button>
			</form>
		</div>
	</div>

	<div class="the_bottom">
		<div>
			版权所有&copy 2006 <a href="http://www.yitongtouzi.com" TARGET="_blank"/>河南易通投资有限公司<a> <br /> CopyRight &copy 2006 HeNan YiTongTouZi Co.,Ltd 
		</div>
	</div>
	<div class="the_bottom_right">客户服务热线:0371-6712966</div>
</body>
</html>

